/************************************************************************************
* Title: appendix.do
* Created by: Jac M. Larner
* Created on: 14/06/24
* Last modified on: 14/06/24
* Last modified by: Jac Larner
* Purpose: This .do file allows for replication the appendix for the paper "Vulnerability Appeals in the COVID-19 Pandemic: Insights from a National Survey Experiment" by Jac M. Larner and Joshua R. Thorp. Please note that some appendix tables are generated in the 'main_analysis.do'. This do.file requires users to first run 'main_analysis.do' to load the data and generate the required variables.


*************************************************************************************/

*Table 1 (appendix)

tab w3_profile_gender
tab w3_age
tab w3_highest_education_gce
tab w3_xprofile_gross_household
tab w3_xONS_urban
tab w3_ethnicity_new

* Figure 1 in apendix is generated in 'main_analysis.do'

 
*** Figures 4 & 5 (appendix): Interacting treatment with respondent ideology
recode w1_statements6 w1_statements7 w1_statements8 w1_statements9 w1_statements10 (1=4) (2=3) (3=2) (4=1) (5=0) (6=.), pre(n) test
gen lib_auth= nw1_statements6 + nw1_statements7 + nw1_statements8 + nw1_statements9 + nw1_statements10
gen lib_auth_1=lib_auth/20
replace lib_auth_1=. if lib_auth>20

eststo m9: reg w3_grid_a1 c.lib_auth_1##i.treatment [pw=w3_W8], robust
margins, at(lib_auth_1=(0(.1)1) treatment=(1 2 3 4))
marginsplot, x(lib_auth_1) recast(line) noci title(Masks compulsory) xtitle("Lib-Auth values") graphregion(margin(r=10)) level(95) ylabel(0 (.1)1) ///
addplot(histogram left_right_1, width(.1)) legend(col(2) pos(6))
graph save "Graph" "la1.gph", replace


eststo m10: reg w3_grid_b1 c.lib_auth_1##i.treatment [pw=w3_W8], robust
margins, at(lib_auth_1=(0(.1)1) treatment=(1 2 3 4))
marginsplot, x(lib_auth_1) recast(line) noci title(Sacrifice freedoms) xtitle("Lib-Auth values") graphregion(margin(r=10)) level(95) ylabel(0 (.1)1) ///
addplot(histogram left_right_1, width(.1)) legend(col(2) pos(6))
graph save "Graph" "la2.gph", replace


eststo m11: reg w3_grid_c c.lib_auth_1##i.treatment [pw=w3_W8], robust
margins, at(lib_auth_1=(0(.1)1) treatment=(1 2 3 4))
marginsplot, x(lib_auth_1) recast(line) noci title(No more lockdowns) xtitle("Lib-Auth values") graphregion(margin(r=10)) level(95) ylabel(0 (.1)1) ///
addplot(histogram left_right_1, width(.1)) legend(col(2) pos(6))
graph save "Graph" "la3.gph", replace


eststo m12: reg w3_grid_d1 c.lib_auth_1##i.treatment [pw=w3_W8], robust
margins, at(lib_auth_1=(0(.1)1) treatment=(1 2 3 4))
marginsplot, x(lib_auth_1) recast(line) noci title(Concerned) xtitle("Lib-Auth values") graphregion(margin(r=10)) level(95) ylabel(0 (.1)1) ///
addplot(histogram left_right_1, width(.1)) legend(col(2) pos(6))
graph save "Graph" "la4.gph", replace


eststo m13: reg w3_grid_e1 c.lib_auth_1##i.treatment [pw=w3_W8], robust
margins, at(lib_auth_1=(0(.1)1) treatment=(1 2 3 4))
marginsplot, x(lib_auth_1) recast(line) noci title(Anger) xtitle("Lib-Auth values") graphregion(margin(r=10)) level(95) ylabel(0 (.1)1) ///
addplot(histogram left_right_1, width(.1)) legend(col(2) pos(6))
graph save "Graph" "la5.gph", replace


eststo m14: reg w3_grid_e1 c.lib_auth_1##i.treatment [pw=w3_W8], robust
margins, at(lib_auth_1=(0(.1)1) treatment=(1 2 3 4))
marginsplot, x(lib_auth_1) recast(line) noci title(Moved) xtitle("Lib-Auth values") graphregion(margin(r=10)) level(95) ylabel(0 (.1)1) ///
addplot(histogram left_right_1, width(.1)) legend(col(2) pos(6))
graph save "Graph" "la6.gph", replace


eststo m15: reg prosocial_index c.lib_auth_1##i.treatment [pw=w3_W8], robust
margins, at(lib_auth_1=(0(.1)1) treatment=(1 2 3 4))
marginsplot, x(lib_auth_1) recast(line) noci title(Prosocial index) xtitle("Lib-Auth values") graphregion(margin(r=10)) level(95) ylabel(0 (.1)1) ///
addplot(histogram left_right_1, width(.1)) legend(col(2) pos(6))
graph save "Graph" "la7.gph", replace


eststo m16: reg affective_index c.lib_auth_1##i.treatment [pw=w3_W8], robust
margins, at(lib_auth_1=(0(.1)1) treatment=(1 2 3 4))
marginsplot, x(lib_auth_1) recast(line) noci title(Affective index) xtitle("Lib-Auth values") graphregion(margin(r=10)) level(95) ylabel(0 (.1)1) ///
addplot(histogram left_right_1, width(.1)) legend(col(2) pos(6))
graph save "Graph" "la8.gph", replace


* Figure 3
grc1leg "la5.gph" "la6.gph" "la7.gph" "la8.gph"
* Figure 4
grc1leg "la1.gph" "la2.gph" "la3.gph" "la4.gph"
